<template>
  <div class="regSuccess" v-cloak>
    <div class="successIcon">
      <div class="lazy">
        <img :src="url"
             alt="">
      </div>
    </div>
    <p class="text">{{text}}</p>
    <My-Button :text="'现在登录'"
               @click.native="OnLogin"></My-Button>
  </div>
</template>

<script>
import MyButton from '@/commonCom/Button-but'
export default {
  name: 'regSuccess',
  components: {
    MyButton
  },
  data () {
    return {
      text: '',
      url: ''
    }
  },
  created () {
    this.text = this.$route.query.errInfo
    this.url = this.$route.query.url
  },
  methods: {
    OnLogin () {
      this.$router.push('/')
    }
  }
}
</script>

<style lang="stylus" scoped>
[v-cloak] {
  display: none !important;
}
.regSuccess {
  text-align: center;

  .successIcon {
    padding: 1.8rem 0 0.6rem 0;

    .lazy {
      position: relative;
      height: 2.8rem;
      img {
        position: absolute;
        top: 0;
        left: 50%;
        margin-left: -1.4rem;
        width: 2.8rem;
      }
    }
  }

  .text {
    color: $color;
    font-size: 0.32rem;
    font-weight: 500;
  }
}
</style>
